﻿@model WordpressDemo.Models.HomeViewModel
@{
    ViewBag.Title = "Home";
}

<header><h1>Wordpress Demo</h1></header>

<p>
    Go to
    <a href="https://developer.wordpress.com/apps/">https://developer.wordpress.com/apps/</a>
    and create yourself an App
</p>
<p>Done?</p>
<p>Then provide me with its following details:</p>

@using (Html.BeginForm())
{
    <fieldset>
        <legend>Wordpress App</legend>
        <p>
            Client ID:
            @Html.TextAreaFor(m => m.ClientID)
        </p>
        <p />

        <input type="submit" value="Submit" />
    </fieldset>
}

@if (Model.HasRedirectUrl)
{
    <p>
        You can now
        <a href="@Model.UserAuthorizeUrl">Sign in on Wordpress.com</a>.
    </p>
    <p>
        Make sure the <strong>Redirect URL</strong> of your app is
        <a href="@Model.RedirectURL">@Model.RedirectURL</a>
    </p>
}